package com.lin;

import java.util.ArrayList;
import java.util.List;

// 订单类，包含订单项列表
class Order {
    private List<OrderItem> items;

    private double totalPrice;

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Order() {
        this.items = new ArrayList<>();
    }

    public void addItem(OrderItem item) {
        items.add(item);
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public double getTotalPrice() {
        return totalPrice;
    }
}